import { list2Obj } from '@/pages/supplier/utils'

// 线索转潜在
const CLUES_2_POTENTIAL_REASONS = [
  { value: 6, label: '项目需求开发' },
  { value: 7, label: '临采询价需求' },
  { value: 8, label: '临采订货需求' },
  { value: 9, label: '客户走手续' },
  { value: 10, label: '客户指定渠道' },
  { value: 11, label: '其他' },
]
// 线索转合格
const CLUES_2_QUALIFIED_REASONS = [
  { value: 1, label: '既定品类开发' },
  { value: 2, label: '缺失品类补充' },
  { value: 3, label: '保供需求开发' },
  { value: 4, label: '项目需求开发' },
  { value: 5, label: '其他' },
]
// 潜在转线索
const POTENTIAL_2_CLUES_REASONS = [
  { value: 21, label: '厂家征信问题' },
  { value: 22, label: '厂家配合度低' },
  { value: 23, label: '频繁出现价格问题' },
  { value: 24, label: '商品质量问题' },
  { value: 25, label: '长期无进货' },
  { value: 26, label: '厂家货源问题' },
  { value: 27, label: '厂家无法开票' },
  { value: 28, label: '其他' },
]
// 潜在转合格
const POTENTIAL_2_QUALIFIED_REASONS = [
  { value: 1, label: '既定品类开发' },
  { value: 2, label: '缺失品类补充' },
  { value: 3, label: '保供需求开发' },
  { value: 4, label: '项目需求开发' },
  { value: 5, label: '其他' },
]
// 合格转潜在
const QUALIFIED_2_POTENTIAL_REASONS = [
  { value: 12, label: '厂家征信问题' },
  { value: 13, label: '厂家配合度低' },
  { value: 14, label: '频繁出现价格问题' },
  { value: 15, label: '商品质量问题' },
  { value: 16, label: '长期无进货' },
  { value: 17, label: '厂家货源问题' },
  { value: 18, label: '厂家无法开票' },
  { value: 19, label: '同类商品合格供应商多' },
  { value: 20, label: '其他' },
]
// 淘汰原因
const ELIMINATION_REASONS = [
  { value: 1, label: '厂家征信问题' },
  { value: 2, label: '厂家配合度低' },
  { value: 3, label: '频繁出现价格问题' },
  { value: 4, label: '商品质量问题' },
  { value: 5, label: '长期无进货' },
  { value: 6, label: '厂家货源问题' },
  { value: 7, label: '厂家无法开票' },
  { value: 9, label: '更换户头' },
  { value: 10, label: '供应商停产' },
  { value: 8, label: '其他' },
]
const ELIMINATION_REASONS_MAP_OBJECT = list2Obj(ELIMINATION_REASONS)

// 淘汰激活 - 线索激活原因
const CLUES_ELIMINATION_ACTIVATION_REASONS = [
  { value: 1, label: '项目需求开发' },
  { value: 2, label: '临采询价需求' },
  { value: 3, label: '临采订货需求' },
  { value: 4, label: '客户走手续' },
  { value: 5, label: '客户指定渠道' },
  { value: 6, label: '其他' },
]
const CLUES_ELIMINATION_ACTIVATION_REASONS_MAP_OBJECT = list2Obj(CLUES_ELIMINATION_ACTIVATION_REASONS)
// 淘汰激活 - 潜在激活原因
const POTENTIAL_ELIMINATION_ACTIVATION_REASONS = [
  { value: 1, label: '项目需求开发' },
  { value: 2, label: '临采询价需求' },
  { value: 3, label: '临采订货需求' },
  { value: 4, label: '客户走手续' },
  { value: 5, label: '客户指定渠道' },
  { value: 6, label: '其他' },
]
const POTENTIAL_ELIMINATION_ACTIVATION_REASONS_MAP_OBJECT = list2Obj(POTENTIAL_ELIMINATION_ACTIVATION_REASONS)
// 淘汰激活 - 合格激活原因
const QUALIFIED_ELIMINATION_ACTIVATION_REASONS = [
  { value: 7, label: '既定品类开发' },
  { value: 8, label: '缺失品类补充' },
  { value: 9, label: '保供需求开发' },
  { value: 10, label: '项目需求开发' },
  { value: 11, label: '其他' },
]
const QUALIFIED_ELIMINATION_ACTIVATION_REASONS_MAP_OBJECT = list2Obj(QUALIFIED_ELIMINATION_ACTIVATION_REASONS)

// 拉黑原因
const BLACKLIST_REASONS = [
  { value: 5, label: '出现严重诚信问题' },
  { value: 6, label: '违反我司合同反贿赂条约《阳光条约》' },
  { value: 7, label: '给我司或我方客户提供虚假资质' },
  { value: 8, label: '价格、质量、售后、维保等过程中出现严重问题' },
  { value: 9, label: '恶意提高我司供货价格' },
  { value: 1, label: '社会舆论问题' },
  { value: 2, label: '供应商经营不善' },
  { value: 3, label: '经营理念不符' },
  { value: 4, label: '其他原因' },

]
const BLACKLIST_REASONS_MAP_OBJECT = list2Obj(BLACKLIST_REASONS)

// 拉黑激活 - 潜在激活原因
const POTENTIAL_BLACKLIST_ACTIVATION_REASONS = [
  { value: 6, label: '项目需求开发 ' },
  { value: 7, label: '临采询价需求 ' },
  { value: 8, label: '临采订货需求 ' },
  { value: 9, label: '客户走手续 ' },
  { value: 10, label: '客户指定渠道' },
  { value: 11, label: '其他' },
]
const POTENTIAL_BLACKLIST_ACTIVATION_REASONS_MAP_OBJECT = list2Obj(POTENTIAL_BLACKLIST_ACTIVATION_REASONS)
// 拉黑激活 - 合格激活原因
const QUALIFIED_BLACKLIST_ACTIVATION_REASONS = [
  { value: 1, label: '既定品类开发 ' },
  { value: 2, label: '缺失品类补充 ' },
  { value: 3, label: '保供需求开发 ' },
  { value: 4, label: '项目需求开发 ' },
  { value: 5, label: '其他' },
]
const QUALIFIED_BLACKLIST_ACTIVATION_REASONS_MAP_OBJECT = list2Obj(QUALIFIED_BLACKLIST_ACTIVATION_REASONS)
// 转合格列信息
const CONVERT_TO_QUALIFIED_TABLE_COLUMNS = [
  { title: '序号', type: 'seq', width: 50 },
  { title: '公司名称', field: 'companyName', width: 160 },
  { title: '基本信息', field: 'basicInformation', width: 160 },
  { title: '人员信息', field: 'personnelInformation', width: 160 },
  { title: '商品信息', field: 'productInformation', width: 160 },
  { title: '管理信息', field: 'managementInformation', width: 160 },
  { title: '合同信息', field: 'contractInformation', width: 160 },
  { title: '资质信息', field: 'qualificationInformation', width: 160 },
  { title: '状态', field: 'state', width: 160 },
  { title: '操作', slots: { default: 'operate' }, width: 120 },
]

// 1: 线索转潜在 2: 线索转合格
// 3: 潜在转线索 4: 潜在转合格
// 5: 合格转潜在
// 10: 淘汰
// 11：淘汰激活 - 线索激活 12: 淘汰激活 - 潜在激活 13: 淘汰激活 - 合格激活
// 20：黑名单
// 21：黑名单激活 - 潜在激活 22: 黑名单激活 - 合格激活
const CONVERT_FORM_INFO = {
  1: { title: '转为潜在', reasonLabel: '转为潜在原因', remarkLabel: '原因说明', reasons: CLUES_2_POTENTIAL_REASONS },
  2: { title: '转为合格', reasonLabel: '转为合格原因', remarkLabel: '原因说明', reasons: CLUES_2_QUALIFIED_REASONS },
  3: { title: '转为线索', reasonLabel: '转为线索原因', remarkLabel: '原因说明', reasons: POTENTIAL_2_CLUES_REASONS },
  4: { title: '转为合格', reasonLabel: '转为合格原因', remarkLabel: '原因说明', reasons: POTENTIAL_2_QUALIFIED_REASONS },
  5: { title: '转为潜在', reasonLabel: '转为潜在原因', remarkLabel: '原因说明', reasons: QUALIFIED_2_POTENTIAL_REASONS, },
  10: { title: '淘汰供应商', reasonLabel: '淘汰原因', remarkLabel: '原因说明', reasons: ELIMINATION_REASONS },
  11: { title: '激活供应商', reasonLabel: '激活原因', remarkLabel: '操作原因', reasons: CLUES_ELIMINATION_ACTIVATION_REASONS },
  12: { title: '激活供应商', reasonLabel: '激活原因', remarkLabel: '操作原因', reasons: POTENTIAL_ELIMINATION_ACTIVATION_REASONS },
  13: { title: '激活供应商', reasonLabel: '激活原因', remarkLabel: '操作原因', reasons: QUALIFIED_ELIMINATION_ACTIVATION_REASONS },
  20: { title: '新建黑名单供应商', reasonLabel: '拉黑原因', remarkLabel: '操作原因', reasons: BLACKLIST_REASONS },
  21: { title: '激活供应商', reasonLabel: '激活原因', remarkLabel: '操作原因', reasons: POTENTIAL_BLACKLIST_ACTIVATION_REASONS },
  22: { title: '激活供应商', reasonLabel: '激活原因', remarkLabel: '操作原因', reasons: QUALIFIED_BLACKLIST_ACTIVATION_REASONS },
  30: { title: '提交审核', remarkLabel: '原因说明' },
}
const INITIAL_FIELDS_VALUE = {
  supplierName: '',
  reason: '',
  reasonDescription: '',
}
export default {
  INITIAL_FIELDS_VALUE,
  CONVERT_TO_QUALIFIED_TABLE_COLUMNS,
  CONVERT_FORM_INFO,
  ELIMINATION_REASONS_MAP_OBJECT,
  BLACKLIST_REASONS_MAP_OBJECT,
  CLUES_ELIMINATION_ACTIVATION_REASONS_MAP_OBJECT,
  POTENTIAL_ELIMINATION_ACTIVATION_REASONS_MAP_OBJECT,
  QUALIFIED_ELIMINATION_ACTIVATION_REASONS_MAP_OBJECT,
  POTENTIAL_BLACKLIST_ACTIVATION_REASONS_MAP_OBJECT,
  QUALIFIED_BLACKLIST_ACTIVATION_REASONS_MAP_OBJECT,
}
